package com.bootlever.framework.rocketmq.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "bootlever.framework.rocketmq")
public class RocketmqProperties {

    private String namesrvAddr;
    private String instanceName = "DEFAULT";
    private Integer clientCallbackExecutorThreads = Runtime.getRuntime().availableProcessors();;
    private Integer pollNameServerInteval = 30000;
    private Integer heartbeatBrokerInterval = 30000;
    private Integer persistConsumerOffsetInterval = 5000;

    public String getNamesrvAddr() {
        return namesrvAddr;
    }

    public void setNamesrvAddr(String namesrvAddr) {
        this.namesrvAddr = namesrvAddr;
    }

    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

    public Integer getClientCallbackExecutorThreads() {
        return clientCallbackExecutorThreads;
    }

    public void setClientCallbackExecutorThreads(Integer clientCallbackExecutorThreads) {
        this.clientCallbackExecutorThreads = clientCallbackExecutorThreads;
    }

    public Integer getPollNameServerInteval() {
        return pollNameServerInteval;
    }

    public void setPollNameServerInteval(Integer pollNameServerInteval) {
        this.pollNameServerInteval = pollNameServerInteval;
    }

    public Integer getHeartbeatBrokerInterval() {
        return heartbeatBrokerInterval;
    }

    public void setHeartbeatBrokerInterval(Integer heartbeatBrokerInterval) {
        this.heartbeatBrokerInterval = heartbeatBrokerInterval;
    }

    public Integer getPersistConsumerOffsetInterval() {
        return persistConsumerOffsetInterval;
    }

    public void setPersistConsumerOffsetInterval(Integer persistConsumerOffsetInterval) {
        this.persistConsumerOffsetInterval = persistConsumerOffsetInterval;
    }
}
